<!-- 主体部分 -->
<div class="layui-body " id="body">
  <!-- 内容主体区域 -->
  <div style="padding: 15px;">
    <blockquote class="layui-elem-quote layui-text">
      欢迎使用<strong>博客管理系统</strong>
    </blockquote>

    <div class="layui-card layui-panel">
      <div class="layui-card-header">
        文章编辑&nbsp;&nbsp;|&nbsp;&nbsp;文章修改
      </div>

      <div class="layui-card-body">
        <form class="layui-form" action="/index.php/index/updAt" method="post">
          <div class="layui-form-item">
            <label class="layui-form-label">文章标题</label>
            <div class="layui-input-block">
              <input type="text" name="title" lay-verify="required" placeholder="请输入"
                     autocomplete="off" class="layui-input" value="{$data.title}">
              <input type="text" name="id" lay-verify="required" placeholder="请输入"
                     autocomplete="off" class="layui-input layui-hide" value="{$data.id}">
              <input type="text" name="uid" lay-verify="required" placeholder="请输入"
                     autocomplete="off" class="layui-input layui-hide" value="{$data.uid}">
            </div>
          </div>
          <div class="layui-form-item">

            <label class="layui-form-label">文章摘要</label>
            <div class="layui-input-block">
              <input type="text" name="summary" lay-verify="required" placeholder="请输入"
                     autocomplete="off" class="layui-input"  value="{$data.summary}">
            </div>
          </div>
          <div class="layui-col-md1">
            <label class="layui-form-label">文章封面</label>
          </div>
          <div class="layui-col-md11">
            <img src="__UPLOAD__/{$data.image}" width="100%" style="padding: 10px">
            <input type="text" name="image" class="layui-hide" value="{$data.image}">
          </div>
          <hr>
          <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label">分类专栏</label>
              <div class="layui-input-block layui-show">
                {php}$i=0;{/php}
                {foreach $col2 as $k1=>$v1}
                {if $v1==""}<input type="checkbox" name="arr[{$i++}]" title="{$k1}" value="{$k1}" >
                {else /}<input type="checkbox" name="arr[{$i++}]" title="{$v1}" value="{$v1}" checked>
                {/if}
                {/foreach}
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">文章类型</label>
              <div class="layui-input-block">
                <select name="atType">
                  <option value="不限类型" disabled selected>不限类型</option>
                  {if $data.atType=="原创"}
                  <option value="原创" selected>原创</option>
                  <option value="转载">转载</option>
                  <option value="翻译">翻译</option>
                  {elseif  $data.atType=="翻译"/}
                  <option value="原创">原创</option>
                  <option value="转载">转载</option>
                  <option value="翻译" selected>翻译</option>
                  {else /}
                  <option value="原创">原创</option>
                  <option value="转载" selected>转载</option>
                  <option value="翻译">翻译</option>
                  {/if}

                </select>
              </div>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">文章标签</label>
            <div class="layui-input-block">
              {php}$j=0;{/php}
              {foreach $lab2 as $k2=>$v2}
              {if $v2==""}<input type="checkbox" name="label[{$j++}]" title="{$k2}" value="{$k2}" >
              {else /}<input type="checkbox" name="label[{$j++}]" title="{$k2}" value="{$k2}" checked>
              {/if}
              {/foreach}
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">可见范围</label>
            <div class="layui-input-block">
              {if $data.range=="全部可见"}
              <input type="radio" name="range" value="全部可见" title="全部可见" checked>
              <input type="radio" name="range" value="仅自己可见" title="仅自己可见">
              {else /}
              <input type="radio" name="range" value="全部可见" title="全部可见" >
              <input type="radio" name="range" value="仅自己可见" title="仅自己可见" checked>
              {/if}

            </div>
          </div>
          <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">文章内容</label>
            <div class="layui-input-block">
                                    <textarea placeholder="请输入内容" class="layui-textarea"
                                              style="height: 1000px;" name="content" value="{$data.content}">{$data.content}</textarea>
            </div>
          </div>
          <div class="layui-form-item">
            <div class="layui-input-block">
              <button type="submit" class="layui-btn" >提交修改</button>
              <a type="button" class="layui-btn layui-btn-primary" href="/index.php/index/index">取消&nbsp;返回</a>
            </div>
          </div>
        </form>
      </div>


    </div>
  </div>
  <br><br>
</div>